1. Field of the Invention
The present invention relates to a method of extracting characteristic image data, and more specifically, to a method of extracting characteristic image data, such as density data or the like of a human face, which is used when a color original image is copied onto a color copy material or a black-and-white copy material.
The present invention also relates to a color data conversion device for an image processing apparatus, and in particular, to a color data conversion device for an image processing apparatus in which color data obtained from a color original image is converted into hue values, saturation values, and lightness values.
2. Description of the Related Art
When a photograph of a person is viewed, the area which is most noticed is the person's face. In order to produce high-quality photographs, it is necessary to print the color and the density of a human face at an appropriate color and an appropriate density.
Conventionally, a face region in an original image of a color film is designated by a light pen, and the density data of the human face is extracted. The amount of exposure is determined based on the extracted density data so that the color of the face is printed appropriately. Such technology is disclosed in Japanese Patent Application Laid-Open Nos. 62-115430, 62-115431, 62-115432, 62-189456, 62-189457, 63-138340, and 63-178222.
However, in the above-described conventional art, there is a drawback in that the printing operation requires much time because an operator must use the light pen to designate the face region of each image. Further, automatization of the technology is difficult because an operator must view the image and designate the face region.
Methods of automatically extracting human face data have been proposed. For example, Japanese Patent Application Laid-Open Nos. 52-156624, 52-156625, 53-12330, 53-145620, 53-145621, and 53-145622 disclose the following method in which human face data is extracted by the extraction of flesh color data. Namely, a color original image is divided into a plurality of points to be photometrically measured. Each of the points to be photometrically measured is divided into three colors of R (red), G (green), and B (blue) which are photometrically measured. A determination is made as to whether the color of each photometrically measured point calculated from the photometric data falls within a flesh color range. A cluster (group) of photometrically measured points which have been determined to be within a flesh color range are used for face density data.
However, in this method, because a color within a flesh color range is used as face density data, regions, which are not face regions and which are flesh color regions such as the ground, tree trunks, clothes, and the like or are regions of a color which is similar to a flesh color, are extracted as density data. Further, even if the same subject is photographed under the same conditions, the hue of the photographed image differs in accordance with the type of film used. Therefore, when the type of film differs, there are cases in which the face density data cannot be extracted automatically. Moreover, when the color of the light source which illuminates the subject is different, the hue of the photographed image differs (e.g., an image photographed with fluorescent light as the light source may be greenish). Therefore, when the light source color differs, there are cases in which the face density data cannot be extracted automatically.
In order to solve the above-mentioned drawback which arises when the light source color differs, the photometric data of the flesh color ranges may be extracted after light source color correction is effected. Light sources can be divided broadly into sunlight, fluorescent light, and tungsten light. However, when sunlight is the light source, the hue differs in accordance with the season and the time of day. Even if the season and the time are the same, the hue differs in accordance with direct or indirect light. Further, with artificial light sources such as fluorescent light, hues vary greatly as there are various types of manufactured light sources. Accordingly, it is difficult to designate the type of light source and effect light source correction for each light source. Even if color correction could be effected perfectly, extraction could not be effected such that flesh color regions such as the ground, tree trunks or the like or regions of a color similar to a flesh color were not extracted, and cases in which the types of films differ could not be addressed.
Conventionally, there exist image processing apparatuses such as image displaying devices, image recording devices and the like. In an image displaying device, an image is read from a color original image such as a film, a print or the like, and the color original image is reproduced and displayed on the basis of the read data. In an image recording device, on the basis of the read data, an amount of exposure is determined and an image is recorded so that the color original image is reproduced.
For example, the density data of a main image, such as a human face or the like, on an original image of a color film is extracted. Based on the extracted density data, an amount of exposure is determined such that the face color is printed appropriately. Such technology is disclosed in Japanese Patent Application Laid-Open Nos. 62-115480, 62-115431, 62-115432, 62-189456, 62-189457, 63-138340 and 63-178222.
Generally, in image processing apparatuses such as those described above, in order to facilitate calculation for determining a composite color when color correction of the color original image is effected and in order to facilitate calculation for determining the tone of the color original image, R data, G data, B data expressing the densities of the three colors of red light, green light and blue light (i.e., the three primary colors R, G, B) are converted into H data, S data, and L data respectively expressing hue (H), saturation (S), and lightness (L) which are used in a color development system.
Known methods of conversion include conversion by use of a HSL hexagonal pyramid, and conversion based on the definitions of Hayden and Reins.
However, due to complex calculation using various arithmetic expressions, the processing times of the above-mentioned conversions are long. Accordingly, in an image processing apparatus, the processing time required for conversion alone is long. A drawback arises in that when this processing time is added to the time for Fundamental processing of the image, the entire processing time of the processing apparatus greatly increases.
In order to solve this drawback, the calculating time can be reduced by using a high-speed type CPU. However, this results in increasing the cost of the processing apparatus. Further, the results of calculation for the above-mentioned conversions are stored in tables in advance, and the respective HSL data corresponding to the RGB data can be output by using these tables. In this way, because calculation at the time of conversion is not used, the calculating time is shortened, and processing at the apparatus can be expedited.
However, in order to output the respective HSL data corresponding to the combinations of the respective RGB data, it is necessary to provide respective tables for H, S, L. Further, the number of indices which designate the output data of the tables is the number of combinations of respective R, G, B data. Therefore, the storage capacity is large. Namely, in order to decrease the difference between densities of an image, the gradations of the image are increased. For example, when the gradations of the image are expressed by 8 bits (0 to 255), indices of (2.sup.8).sup.3 bits are required for the respective tables for outputting the HSL data. Accordingly, when the respective HSL output data are 8 bits, the storage capacity of each table is approximately (2.sup.24) bytes. Accordingly, an extremely large capacity of approximately 50 megabytes, i.e., (2.sup.24) 3, is needed for all of the respective HSL tables, which is impractical.